package hnlg.com.cn.purviewmanage.modulemanage.junit;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import hnlg.com.cn.model.ModuleVO;
import hnlg.com.cn.purviewmanage.modulemanage.service.IModuleService;

@SpringBootTest
@RunWith(SpringRunner.class)
public class IModuleServiceImplTest {
@Resource IModuleService ModuleService;
	
	@Test
	public void testQueryList() throws Exception {
		ModuleVO vo=new ModuleVO();
		ModuleService.queryList(vo);
	}

	@Test
	public void testQueryvo() throws Exception {
		ModuleService.queryvo("1");
	}

	@Test
	public void testAddModule() throws Exception {
		ModuleVO vo=new ModuleVO();
		vo.setModulename("时间管理");
		vo.setUrl("timemanage.html");
		vo.setMenuitem("10");
		ModuleService.addModule(vo);
	}

	@Test
	public void testUpdateModule() throws Exception {
		ModuleVO vo=new ModuleVO();
		vo.setModulename("行政管理");
		vo.setUrl("government.html");
		vo.setModuleid(8);
		ModuleService.updateModule(vo);
	}

	@Test
	public void testDeleteModule() throws Exception {
		ModuleService.deleteModule("8");
	}

}
